<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>

<body>
<div id="#app">


<form action="/admin/go/findAll" method="post">
    <input name="name">
    <input type="submit"></input>
</form>

<table border="1px">
    <tr>
        <td>用户名</td>
        <td>真实姓名</td>
        <td>用户类型</td>
        <td>状态</td>
        <td>操作</td>
    </tr>
    <tr th:each="list:${admin}">
        <td th:text="${list.username}"></td>
        <td th:text="${list.realname}"></td>
        <td th:text="${list.userrole}"></td>
        <td th:text="${list.userstate}==0?'启用':'禁用'"></td>
        <td><a th:if="${list.userrole=='普通管理员'}" th:href="@{/admin/go/findById(id=${list.id},state=${list.userstate})}"><button th:text=" ${list.userstate==0?'禁用':'启用'}"></button></a>
            <a th:href="@{'/admin/go/update?id='+${list.id}}">修改名字</a>
        </td>
    </tr>
</table>
</div>

</body>
</html>